package com.irdstudio.efp.nls.service.yed.common.rules.apply;

import com.irdstudio.basic.framework.core.constant.EsbRetCodeStandard;
import com.irdstudio.basic.framework.core.exception.BizException;
import com.irdstudio.efp.nls.service.yed.common.rules.CheckRule;
import com.irdstudio.efp.nls.service.vo.NlsApplyInfoVO;

import java.util.Objects;

/**
 * 需求编号:2019D08--
 * 问题编号:
 * 开发人员: caoxin
 * 创建日期:2019/12/6
 * 功能描述:
 * 修改日期:2019/12/6
 * 修改描述:
 */
public class ApplyExistRule implements CheckRule {
    private NlsApplyInfoVO nlsApplyInfoVO;

    public ApplyExistRule(NlsApplyInfoVO nlsApplyInfoVO) {
        this.nlsApplyInfoVO = nlsApplyInfoVO;
    }
    @Override
    public void check() throws BizException {
        if (Objects.isNull(nlsApplyInfoVO)) {
            throw new BizException(EsbRetCodeStandard.WFJKYWGZ.getValue(), "不存在用信申请流水号用信申请记录，请核查！");
        }
    }
}
